import unittest
import HTMLTestRunner
# from django3.settings import BASE_DIR
import os


def hell(a):
    print(a)
    return a


class HellTest(unittest.TestCase):
    def setUp(self):
        self.hell = hell

    def tearDown(self):
        pass

    def testHell(self):
        self.assertEqual(self.hell('ad'), 'ad')


if __name__ == '__main__':
    testunit = unittest.TestSuite()
    testunit.addTest(HellTest('testHell'))
    filePath = "/Users/admin/project/django3/learn_test/test.html"

    fp = open(filePath, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp, title=u'print', description=u'简单')
    runner.run(testunit)
    fp.close()